﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:SampleData="clr-namespace:Expression.Blend.SampleData.ImageListSampleData" xmlns:Microsoft_Phone_Controls_Maps="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps" 
    x:Class="Foursquare.ItemDetailPage"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignHeight="696" d:DesignWidth="480"
    shell:SystemTray.IsVisible="True" d:DataContext="{d:DesignData /SampleData/VenueSampleData.xaml}">

	<phone:PhoneApplicationPage.Resources>
		<SampleData:ImageListSampleData x:Key="ImageListSampleData" d:IsDataSource="True"/>
		<DataTemplate x:Key="PhotosItemTemplate">
			<Image Source="{Binding photos}" HorizontalAlignment="Left" Height="120" Margin="0,0,6,0"/>
		</DataTemplate>
	</phone:PhoneApplicationPage.Resources>
	<phone:PhoneApplicationPage.ApplicationBar>
		<shell:ApplicationBar>
			<shell:ApplicationBarIconButton IconUri="/icons/appbar.check.rest.png" IsEnabled="True" Text="check-in"/>
			<shell:ApplicationBarIconButton IconUri="/icons/appbar.share.rest.png" IsEnabled="True" Text="share"/>
		</shell:ApplicationBar>
	</phone:PhoneApplicationPage.ApplicationBar>
<!--Sample code showing usage of ApplicationBar-->
<!--<phone:PhoneApplicationPage.ApplicationBar>
        <shell:ApplicationBar IsVisible="True" IsMenuEnabled="True">
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button1.png" Text="Button 1"/>
            <shell:ApplicationBarIconButton IconUri="/Images/appbar_button2.png" Text="Button 2"/>
            <shell:ApplicationBar.MenuItems>
                <shell:ApplicationBarMenuItem Text="MenuItem 1"/>
                <shell:ApplicationBarMenuItem Text="MenuItem 2"/>
            </shell:ApplicationBar.MenuItems>
        </shell:ApplicationBar>
    </phone:PhoneApplicationPage.ApplicationBar>-->
	<phone:PhoneApplicationPage.FontFamily>
		<StaticResource ResourceKey="PhoneFontFamilyNormal"/>
	</phone:PhoneApplicationPage.FontFamily>
	<phone:PhoneApplicationPage.FontSize>
		<StaticResource ResourceKey="PhoneFontSizeNormal"/>
	</phone:PhoneApplicationPage.FontSize>
	<phone:PhoneApplicationPage.Foreground>
		<StaticResource ResourceKey="PhoneForegroundBrush"/>
	</phone:PhoneApplicationPage.Foreground>
<!--LayoutRoot is the root grid where all page content is placed-->
    <ScrollViewer>
		<!--LayoutRoot is the root grid where all page content is placed-->
		<Grid x:Name="LayoutRoot">
			<Grid.RowDefinitions>
				<RowDefinition Height="Auto"/>
				<RowDefinition Height="*"/>
			</Grid.RowDefinitions>

			<!--TitlePanel contains the name of the application and page title-->
			<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
				<TextBlock x:Name="ApplicationTitle" Text="MIC#9 Foursquare" Style="{StaticResource PhoneTextNormalStyle}"/>
				<TextBlock x:Name="PageTitle" Text="{Binding name}" Style="{StaticResource PhoneTextTitle1Style}" Margin="0" TextWrapping="Wrap" d:LayoutOverrides="Width"/>
			</StackPanel>
			<StackPanel x:Name="ContentPanel" d:LayoutOverrides="Width, Height" Margin="12,0" Grid.Row="1">
				<Microsoft_Phone_Controls_Maps:Map Margin="0"/>
				<ListBox x:Name="photosListBox" ItemTemplate="{StaticResource PhotosItemTemplate}" ItemsSource="{Binding Collection}" Margin="0" ItemsPanel="{StaticResource HorizontalItemsPanelTemplate}"/>
				<Grid Height="100">
					<Grid.ColumnDefinitions>
						<ColumnDefinition/>
						<ColumnDefinition/>
						<ColumnDefinition/>
					</Grid.ColumnDefinitions>
					<TextBlock TextWrapping="Wrap" VerticalAlignment="Center" d:LayoutOverrides="Width" HorizontalAlignment="Center" TextAlignment="Center"><Run Text="{Binding stats.checkinsCount}"/><LineBreak/><Run Text="check-ins"/></TextBlock>
					<TextBlock TextWrapping="Wrap" VerticalAlignment="Center" d:LayoutOverrides="Width" HorizontalAlignment="Center" TextAlignment="Center" Grid.Column="1"><Run Text="{Binding stats.usersCount}"/><LineBreak/><Run Text="people"/></TextBlock>
					<TextBlock TextWrapping="Wrap" VerticalAlignment="Center" d:LayoutOverrides="Width" HorizontalAlignment="Center" TextAlignment="Center" Grid.Column="2"><Run Text="{Binding hereNow.count}"/><LineBreak/><Run Text="here now"/></TextBlock>
				</Grid>
				<TextBlock TextWrapping="Wrap" Text="distance" FontSize="29.333"/>
				<TextBlock TextWrapping="Wrap" FontSize="21.333" Margin="12,0,0,0" Foreground="{StaticResource PhoneAccentBrush}"><Run Text="{Binding location.distance}"/><Run Text=" meters"/></TextBlock>
				<TextBlock TextWrapping="Wrap" Text="address" FontSize="29.333"/>
				<TextBlock TextWrapping="Wrap" Text="{Binding location.longAddress}" FontSize="21.333" Margin="12,0,0,0" Foreground="{StaticResource PhoneAccentBrush}"/>
			</StackPanel>

		</Grid>

	</ScrollViewer>

</phone:PhoneApplicationPage>
